<include file="Public/ADMIN/HTML/Admin_header/admin_first_head.html" />
<title>课程管理{$Think.const.TITLE}</title>
<include file="Public/ADMIN/HTML/Admin_header/admin_css_and_js.html" />
<include file="Public/ADMIN/HTML/Admin_header/admin_title.html" />
<include file="Public/ADMIN/HTML/Admin_header/admin_middle_list.html" />
<!-- <include file="Public/ADMIN/HTML/Left_list/specialcourse_left_list.html" />
 --><!-- DataTables Example -->
    <style type="text/css">

 /*   .select{
		height: 1.3em;
		width: 1.6em;
		font-size: 2px;
	}*/
          .p{
            height:100px;
            width: 50%;
            position: absolute;
            left: 30%;
          }
              .pages a,  
            .pages span {  
                display: inline-block;  
                padding: 2px 5px;  
                margin: 2 3px;  
                border: 1px solid #f0f0f0;  
                -webkit-border-radius: 3px;  
                -moz-border-radius: 3px;  
                border-radius: 3px;  
            }  
              
            .pages a,  
            .pages li {  
                display: inline-block;  
                list-style: none;  
                text-decoration: none;  
                color: #58A0D3;  
            }  
              
            .pages a.first,  
            .pages a.prev,  
            .pages a.next,  
            .pages a.end {  
                margin:0;  
            }  
              
            .pages a:hover {  
                border-color: #50A8E6;  
            }  
              
            .pages span.current {  
                background: #50A8E6;  
                color: #FFF;  
                font-weight: 700;  
                border-color: #50A8E6;  
            }  
            .top{
            	position: relative;
            	left: 45%;
            	top: 2%;
            	height: 15%;            }
            .center{
            	position: relative;
            	height: 60%;
                top: 2%;

            }
            .button{
            	position: relative;
            	height: 60%;
            	top: 80%;
            }
          </style>  
          <div>
          	<div>

  <!-- Nav tabs -->
  <div class="top">
   <ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">课程详情</a></li>
    <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">学生名单</a></li>
   <!--  <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li>
    <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li> -->
  </ul>	
  </div>
 

  <!-- Tab panes -->
  <div class="center">	

  <div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="home">
    <div style="position: relative;left: 10%;">
    	

        <volist name="detail" id="vo"> 
				<div class="col-md-8" style="margin: 0 0 40px 20px">
					<p style="font-size: 24px; color: #007aff; font-family: 微软雅黑, 宋体;">
						{$vo.scname}</p>
					<div class="blog-content" style="float: left">
						<div class="11" style="margin: 15px 0 5px 0">
							<blockquote>
								<address>
									<span class="meta-author" style="color: #f09606;">所属专题：{$vo.sid}</span>&nbsp;&nbsp;
									<span class="meta-author" style="color: #f09606;">开始时间：{$vo.startdate}</span>&nbsp;&nbsp;
									<span class="meta-author" style="color: #f09606;">结束时间：{$vo.enddate}</span>&nbsp;&nbsp;
									<span class="meta-author" style="color: #f09606;">开课地点：{$vo.place}</span>
								</address>
							</blockquote>
						</div>
						<div class="as" style="margin: 0 0 0 10px">
							<span class="meta-author"
								style="font-weight: bold; color: #1EA6E9;">课程简介：</span>
							{$vo.content|htmlspecialchars_decode|stripslashes}
						</div>
						</br> 
						<div class="as" style="margin: 0 0 0 10px">
							<span class="meta-author"
								style="color: #1EA6E9; font-weight: bold;">课程票数：</span>
							总票数：{$vo.totalticket|htmlspecialchars_decode|stripslashes}/剩余票数：{$vo.restticket|htmlspecialchars_decode|stripslashes}
						</div>
						</br> 
						<div class="as" style="margin: 0 0 0 10px">
							<span class="meta-author"
								style="color: #1EA6E9; font-weight: bold;">发布时间：</span>
							{$vo.scdate|htmlspecialchars_decode|stripslashes}
						</div>
						</br>
						<div class="as" style="margin: 0 0 0 10px">
							<span class="meta-author"
								  style="color: #1EA6E9; font-weight: bold;">课程结果：</span>
							{$vo.result|htmlspecialchars_decode|stripslashes}
						</div>
						<blockquote style="margin: 50px 0 0 0; color: #f09606;">
							<address>
							
								<span class="meta-author" style="color: #468847;"> 附件：<a
									    href="{$Think.const.RESOURCES}UPLOADS/attach/{$vo.attach}">{$vo.attach|substr=###,9,30}</a>
								</span>&nbsp;</br>
					
							</address>
						</blockquote>
			
					</div>
			</div>
				 </volist> 

    </div>
    			
    </div>



  <div role="tabpanel" class="tab-pane" id="profile">
   <div class="widget-content padded clearfix" style="width: 90%;position: relative;left: 5%;">
				<table class="table table-bordered table-striped dataTable"
					id="datatable-editable">
					<thead>
						<th style="width: 5%; text-align: center">编号</th>
						<th style="width: 7%; text-align: center">学号</th>
						<th style="width: 7%; text-align: center;">姓名</th>
						<th style="width: 9%; text-align: center">活动分数</th>
						<th style="width: 7%; text-align: center;" class="sorting" role="columnheader" tabindex="0" aria-controls="datatable-editable" rowspan="1" colspan="1">出勤状态</th>						
						<th style="width: 5%; text-align: center;" class="sorting" role="columnheader" tabindex="0" aria-controls="datatable-editable" rowspan="1" colspan="1" aria-label="活动简述: activate to sort column ascending">操作</th>
					</thead>
						
						<tbody>
							<assign name="number" value="1" />
							<assign name="project_not_through_id" value="100000" />
							<volist name="stulist" id="vo">
								<tr>
									<td style="text-align: center;">{$vo.ssid}</td>
									<td style="text-align: center;">{$vo.stunum}</td>
									<td style="text-align: center;">{$vo.realname}</td>
									<td style="text-align: center;">{$vo.score}</td>
									<td style="text-align: center;"><span class="label label-primary">{$vo.state}</span>
									</td>
									<td>
									<a class="icon-remove" style="padding-left:60px ;" href="{:U('activity/studel',array('id'=>$vo['id']))}"></a>
									<a class=" icon-pencil" data-toggle="modal" data-target="#myModal" onclick="update(this)"></a>
									</td>
								</tr>
							</volist>
						</tbody>
														
				</table>
			</div>
    </div>
  </div>  

</div>

 <!--  <include file="Public/HOME/HTML/footer.html" />	 -->

	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">  
							  <div class="modal-dialog">  
							    <div class="modal-content">  
							      <div class="modal-header">  
							        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>  
							        <h4 class="modal-title">修改信息</h4>  
							      </div> 
							      <div class="modal-body">  
							      <form method="post"  class="form-horizontal" >
										<input id="stu_id" type="text" name="ssid" hidden="">
							      		<div class="form-group">
											<label class="control-label col-md-2"> 项目分数 </label>
											<div class="col-md-8">
												<input class="form-control" id="score"  type="text" name="score" >
											</div>
										</div>	
											<div class="form-group">
													<label class="control-label col-md-2">出勤状态  
													</label> 
														<div class="col-md-8">
														  	<select name="state" id="state" class="form-control">
												      		
												      	</select>
														</div>
											</div> 
													<div class="form-group">
															
														<div class="modal-footer">  
												        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>  
												        <button type="submit" class="btn btn-primary" id="save_data">保存</button>  
												      	</div> 
														</div>
							      </form>
							  	</div> 

							      	<script type="text/javascript">
							      	function update(o){
							      		var tr= o.parentNode.parentNode;
							      		var tds=tr.cells;
							      		var id=tds[0].innerText;
							      		var state=tds[4].innerText;
							      		var score=tds[3].innerText;
							      		$("#stu_id").val(id);
							      		$("#score").val(score);
							      		if (state=="未参加") {
							      			$("#state").html(
							      			  '<option selected="selected" value="未参加">未参加</option><option value="已参加">已参加</option><option value="缺 席">缺 席</option>'
							      			  );
							      		}else if(state=="已参加"){
							      			$("#state").html(
							      			  '<option value="未参加">未参加</option> <option selected="selected"  value="已参加">已参加</option><option value="缺 席">缺 席</option>'
							      			  );
							      		}else{
							      			$("#state").html(
							      			  '<option value="未参加">未参加</option><option value="已参加">已参加</option><option selected="selected"  value="缺 席">缺 席</option>'
							      			  );
							      		}

							      	}
										 $("#save_data").click(function(){
										 	 $.ajax({
											  	type:"get",
					            				url:"__CONTROLLER__/stuedit/",
											    data: $("form").serialize(),
											    success: function(data) {
											    	if (data) {
											         alert("修改成功");
											     }else{
											     	alert("修改失败");
											     }
											    }
											});
										 });

										</script>
							      </div>  
							      
							    </div><!-- /.modal-content -->  
							  </div><!-- /.modal-dialog -->  

<!-- model -->


</body>


 <include file="Public/HOME/HTML/footer.html" />	

</html>